package top.houry.im.client;

import javafx.application.Application;
import javafx.stage.Stage;
import top.houry.im.client.controller.ImClientLoginUiController;
import top.houry.im.client.netty.ImClientNetty;
import top.houry.im.ui.controller.ImUiLoginController;

public class ImClientApplication extends Application {

    public static void main(String[] args) {
        launch();
    }

    @Override
    public void start(Stage primaryStage) {
        initController();
        initNettClient();
    }

    private void initController() {
        ImUiLoginController loginController = ImClientLoginUiController.getInstance();
        loginController.show();
    }

    private void initNettClient() {
        new Thread(() -> ImClientNetty.getInstance().startImClient()).start();
    }

}
